import pandas as pf

df = pf.read_csv("dropna.csv")
# 替换为平均值
'''df.method({col: value}, inplace=True)'''
avg = df["age"].mean()
df["age"].fillna(avg, inplace=True)
print(df)
